package ipdesk.model.report.excel;


import java.util.List;

import com.ibatis.dao.client.DaoManager;
import com.ibatis.dao.client.template.SqlMapDaoTemplate;

import ecg.util.SessionUtils;

public class ExcelDocumentImpl extends SqlMapDaoTemplate implements IExcelDocument
{
	public ExcelDocumentImpl(DaoManager manager)
	{
		super(manager);	
	}
	
	/**
	 * 해당 센터, 해당 사용자, 해당 리포트에 대한 리스트 목록 조회.
	 */
	public List<DocumentBean> getDataList(DocumentBean documentBean) throws Exception
	{
		String reportGubun = documentBean.getReportGubun();
		
		String queryId = "";
		
		if(reportGubun.equals("consultAnalysis") || reportGubun == "consultAnalysis"){
			queryId = "consult" + "." + "excelDataListAnalysis";
		}else{
			queryId = reportGubun + "." + "excelDataList";
		}
		
		
	
		List<DocumentBean> dataList = this.queryForList(queryId, documentBean);
		
		return dataList;
	}
}
